@layout("/common/_container.html",{js:["/assets/order/orderPut/orderPut.js"]}){

<div class="layui-body-header">
    <span class="layui-body-header-title">Inbound Order Management</span>
</div>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-form toolbar">
                        <div class="layui-form-item">
				            <div class="layui-inline">
                				<input id="condition" class="layui-input" type="text" placeholder="Keywords"/>
				            </div>
		                    <div class="layui-inline">
								<select id="putCustomerId">
					            	<option value="">Select Customer</option>
						            @for(item in customerlist!){
						            <option value="${item.id}">${item.customerName}</option>
						            @}
					        	</select>
		                    </div>
		                    <div class="layui-inline">
								<select id="warehouseId">
					            	<option value="">Select Warehouse</option>
						            @for(item in basicWarehouseList!){
						            <option value="${item.id}">${item.warehouseName}</option>
						            @}
					        	</select>
		                    </div>
				            <div class="layui-inline">
				                <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon"></i>Search</button>
				                <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon"></i>Add</button>
                                    @if(shiro.hasPermission("/orderPut/export")){
                                        <button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon"></i>Export</button>
                                    @}
                                <button id="btnExpimport" class="layui-btn icon-btn"><i class="layui-icon"></i>Import Excel</button>
<!--                                <button id="btnExpimportDD" class="layui-btn icon-btn"><i class="layui-icon"></i>Import Duodian Excel</button>-->
				                <button id="btnSubmission" class="layui-btn layui-btn-normal"><i class="layui-icon"></i>Batch Submit</button>
<!--                                <button id="pulljstputorder" class="layui-btn icon-btn"><i class="layui-icon"></i>Pull JST Purchase Inbound Order 1</button>-->
                                <button id="btnTovoid" class="layui-btn layui-btn-danger"><i class="layui-icon">🗑️</i>Batch Cancel</button>
				            </div>
                        </div>
                    </div>
                    <table class="layui-table" id="orderPutTable" lay-filter="orderPutTable"></table>
                    <table class="layui-table" id="orderPutDetailedTable" lay-filter="orderPutDetailedTable"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<input id="putDetailedNumber" type="hidden">
<script type="text/html" id="toolbarfromDetailed">
            <div class="layui-inline">
                <input id="condition2" class="layui-input" type="text" placeholder="Product Name, Code, Item No"/>
            </div>
            <div class="layui-inline">
                <button id="btnSearchDetailed" class="layui-btn icon-btn"><i class="layui-icon"></i>Search</button>
                <button id="btnAddDetailed" class="layui-btn icon-btn"><i class="layui-icon"></i>Add Detail</button>
            </div>
</script>
<script type="text/html" id="tableBar">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">Edit</a>
</script>

<script type="text/html" id="tableBarDetailed">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="editDetailed" id="editDetailed">Edit</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="deleteDetailed" id="deleteDetailed">Delete</a>
</script>

<script type="text/html" id="billstateTpl">
  {{#  if(d.billstate === 'Rejected'){ }}
    <span style="color: #FF4500;">{{ d.billstate }}<i class="layui-icon"></i></span>
  {{#  } else { }}
    {{ d.billstate }}
  {{#  } }}
</script>


@}